export default {
    setItem(key, value) {
        localStorage.setItem(key, JSON.stringify(value))
    },
    getItem(key) {
        if (this.getItem(key)) {
            return JSON.parse(localStorage.getItem(key))
        } else {
            return '';
        }
    },
    removeItem(key) {
        if (this.getItem(key)) {
            localStorage.removeItem(key)
        }
    },
    clearAll() {
        localStorage.clear();
    }
}
